from collections import Counter
from typing import List


class Solution:
    def numberOfPairs(self, nums: List[int]) -> List[int]:
        cnt = Counter(nums).items()
        a = [v // 2 for k, v in cnt]
        b = [v % 2 for k, v in cnt]
        return [sum(a), sum(b)]
